<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <title>添加收藏</title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css"  media="all" />

    <style>
        .layui-input-block{
            margin-left: 0px !important;
        }
        .layui-form-switch{
            margin-top: 0px !important;
        }
    </style>
</head>
<body>
<div class="container" style="width: 550px;margin: 0 auto;">
    <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
        <legend>添加收藏</legend>
    </fieldset>
    <form class="layui-form " action="" >
        <input type="hidden" id="collect-url" name="url"/>
        <input type="hidden" id="collect-description" name="description"/>
        <input type="hidden" id="collect-favicon" name="favicon" value="" />
        <div class="layui-form-item">
            <div class="layui-input-block">
                <img id="favicon" src="" alt="" />
                <input type="text" id="collect-title" name="title" autocomplete="off" placeholder="收藏标题" class="layui-input" />
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <div class="layui-input-block">
                <textarea placeholder="收藏备注" class="layui-textarea" name="remark"></textarea>
            </div>
        </div>
        <div class="layui-form-item" pane="">
            <div class="layui-input-block" style="text-align: center">
                是否公开
                <input type="checkbox"  name="share" value="1" lay-skin="switch" lay-filter="switchTest" title="开关" />
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
            <legend style="font-size: 15px;">收藏夹</legend>
        </fieldset>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <select name="categoryId" lay-filter="aihao">
                    <option value=""></option>
                    <option th:each="category,categoryStat : ${categorys}" th:value="${category.id}" th:text="${category.name}"></option>
                </select>
            </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
            <legend style="font-size: 15px;">或添加收藏夹</legend>
        </fieldset>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="text" name="newCategory" autocomplete="off" placeholder="添加收藏夹" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-small" lay-submit="" lay-filter="collect" style="width: 100%;">收藏</button>
        </div>
    </form>
</div>


<script src="/static/plugins/layui/layui.js" charset="utf-8"></script>
<script src="/static/plugins/jquery/jquery-3.2.0.min.js" charset="utf-8"></script>
<script src="/templates/theme/default/collect/js/collect.js" charset="utf-8"></script>

</body>
</html>